import Data.List

noDups :: [ Int ]
noDups = [ a | a<-[1..10000], let b = show a, b == nub b ]

panDigitalProducts = [ [a,b,c] | a<-noDups, b<-noDups, a<b, let c = a*b, isPanDigital (a,b,c) ] 
	where
	isPanDigital (a,b,c)
		| length text /= 9 			= False
		| length (nub text) /= 9 	= False
		| any (=='0') text			= False
		| otherwise					= True
		where
		text = concat [show a, show b, show c]
		
euler_032 = sum $ nub $ map (!!2) panDigitalProducts
		